﻿using System.ComponentModel;
using System.Windows;

namespace Gmantis.Controls.DataGrid
{
    public class DataGridViewProperties : INotifyPropertyChanged
    {
        // Fields
        private Thickness _cellsAreaMargin = new Thickness();
        private bool _isDraggingVerticalFreezingSeparator;
        private bool _isOverVerticalFreezingSeparator;

        // Events
        public event PropertyChangedEventHandler PropertyChanged;

        // Methods
        private void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        // Properties
        public Thickness CellsAreaMargin
        {
            get
            {
                return this._cellsAreaMargin;
            }
            set
            {
                if (this._cellsAreaMargin != value)
                {
                    this._cellsAreaMargin = value;
                    this.OnPropertyChanged("CellsAreaMargin");
                }
            }
        }

        public bool IsDraggingVerticalFreezingSeparator
        {
            get
            {
                return this._isDraggingVerticalFreezingSeparator;
            }
            set
            {
                if (this._isDraggingVerticalFreezingSeparator != value)
                {
                    this._isDraggingVerticalFreezingSeparator = value;
                    this.OnPropertyChanged("IsDraggingVerticalFreezingSeparator");
                }
            }
        }

        public bool IsOverVerticalFreezingSeparator
        {
            get
            {
                return this._isOverVerticalFreezingSeparator;
            }
            set
            {
                if (this._isOverVerticalFreezingSeparator != value)
                {
                    this._isOverVerticalFreezingSeparator = value;
                    this.OnPropertyChanged("IsOverVerticalFreezingSeparator");
                }
            }
        }
    }
}
